<!doctype html><html><head><meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=false" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>LEKO&trade;</title>
<link rel="icon" type="image/ico" href="favicon.ico" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="stylesheet" type="text/css" href="leko.css" />
<link rel="stylesheet" type="text/css" href="leko.demo.css" />
<link rel="alternate" type="application/rss+xml" title="" href="leko.xml" />
<script src="jquery.js"></script><script src="leko.js"></script><script src="leko.list.js"></script></head><body><div id="page" class="table"><header><nav></nav></header><h2 class="en">jQuery.fn.nav</h2><hr />对<a class="en" href="jQuery.fn.list.html"> list </a>组件的再封装组件，创建横向或纵向的导航菜单。<section><h4><b>语法</b></h4><code><i>jQuery</i> = <strong>jQuery</strong>(<i>selector</i>).<strong>nav</strong>({[<i>live</i>] , [<i>effect</i>] , [<i>speed</i>] , [<i>fx</i>] , [<i>event</i>] , [<i>vertical</i>] , [<i>inner</i>] , [<i>checked</i>]})</code></section><section><h4><b>参数</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row1"><th class="col2">参数名</th><th class="col2">是否可选</th><th class="col2">缺省值</th><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="1" class="en">live</td><td class="en" rowspan="1">√</td><td class="en" rowspan="1">li</td><td rowspan="1" class="en">string</td><td class="en"></td><td>确定列表项的选择符。</td></tr><tr class="odd"><td rowspan="4" class="en">effect</td><td class="en" rowspan="4">√</td><td class="en" rowspan="4">undefined</td><td rowspan="1" class="en">string</td><td class="en"></td><td>预注册的效果函数的名称。参见<a class="en" href="Leko.effects.list.html"> Leko.effects.list </a>接口对象。</td></tr><tr class="odd"><td rowspan="1" class="en">function</td><td class="en"></td><td>自定义的效果函数。该回调函数将被用来遍历处理列表的每一项。参见<a class="en" href="Leko.effects.list.html"> Leko.effects.list </a>接口对象。</td></tr><tr class="odd"><td rowspan="1" class="en">array</td><td class="en"></td><td>要同时应用的多个组合效果。包含的项目既可以是已注册的函数名称，也可以是自定义函数体。</td></tr><tr class="odd"><td rowspan="1" class="en">undefined</td><td class="en"></td><td>不应用任何附加效果。</td></tr><tr><td rowspan="4" class="en">speed</td><td class="en" rowspan="4">√</td><td class="en" rowspan="4">1000</td><td rowspan="3" class="en">string</td><td class="en">slow</td><td>预设的速度级别。相当于600ms</td></tr><tr><td class="en">normal</td><td>预设的速度级别。相当于400ms</td></tr><tr><td class="en">fast</td><td>预设的速度级别。相当于200ms</td></tr><tr><td rowspan="1" class="en">number</td><td class="en"></td><td>精确指定速度的整数数值。单位为毫秒。</td></tr><tr class="odd"><td rowspan="1" class="en">fx</td><td class="en" rowspan="1">√</td><td class="en" rowspan="1">outback</td><td rowspan="1" class="en">string</td><td class="en"></td><td>要应用的缓动函数名称。参见<a class="en" href="jQuery.easing.html"> jQuery.easing </a>对象。</td></tr><tr><td rowspan="3" class="en">event</td><td class="en" rowspan="3">√</td><td class="en" rowspan="3">0</td><td rowspan="3" class="en">number</td><td class="en">0</td><td>列表项在<mark class="en"> onclick </mark>时被选中。</td></tr><tr><td class="en">1</td><td>列表项在<mark class="en"> onmouseenter </mark>时被选中。</td></tr><tr><td class="en">2</td><td>列表项在<mark class="en"> onfocus </mark>时被选中。</td></tr><tr class="odd"><td rowspan="2" class="en">vertical</td><td class="en" rowspan="2">√</td><td class="en" rowspan="2">false</td><td rowspan="2" class="en">boolean</td><td class="en">true</td><td>竖列表。</td></tr><tr class="odd"><td class="en">false</td><td>横列表。</td></tr><tr><td rowspan="2" class="en">inner</td><td class="en" rowspan="2">√</td><td class="en" rowspan="2">false</td><td rowspan="2" class="en">boolean</td><td class="en">true</td><td>基于列表项的内容尺寸创建附加效果。仅当指定了扩展效果函数时有效。</td></tr><tr><td class="en">false</td><td>基于列表项的占位尺寸创建附加效果。仅当指定了扩展效果函数时有效。</td></tr><tr class="odd"><td rowspan="3" class="en">checked</td><td class="en" rowspan="3">√</td><td class="en" rowspan="3">0</td><td rowspan="1" class="en">number</td><td class="en"></td><td>选定第几个列表项。</td></tr><tr class="odd"><td rowspan="1" class="en">jquery</td><td class="en"></td><td>选定哪一个列表项。</td></tr><tr class="odd"><td rowspan="1" class="en">element</td><td class="en"></td><td>选定哪一个列表项。</td></tr></tbody></table></section><section><h4><b>返回</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row2"><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="1" class="en">jQuery</td><td class="en">this</td><td></td></tr></tbody></table></section><script>$(function(){$("button").click(function(){eval($(this).prev().prev().text());});});</script><section><h4><b>示例</b></h4><pre>$(&quot;ul.nav&quot;).nav();</pre><br /><pre>$(&quot;ol.nav&quot;).nav({vertical:true,effect:[&#039;lava&#039;,&#039;lamp&#039;],lava:{borderBottomColor:&#039;#999&#039;},lamp:{color:&#039;#999&#039;}});</pre></section><section><h4><b>实例</b></h4><ol><li><a href="jQuery.fn.nav.0.html">测试用例演示</a></li></section><section><h4><b>文件</b></h4><ol class="en"><li><a href="jquery.js">jquery.js</a> (70.48KB)</li><li><a href="leko.js">leko.js</a> (20.68KB)</li><li class="within"><a href="leko.list.js">leko.list.js</a> (3.08KB)</li></ol></section><footer><section id="foot"><hr /><h6>苏昱(苏小雨)作品<br />灵镭信息科技，创造代码之美</h6><a class="en" href="http://www.lekolite.cn" target="_blank">Copyright © 2010 lekolite.cn , All rights reserved</a></section></footer></div></body></html>